home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio / Ham Radio CD-ROM (Emerald Software) (1995).ISO / tech / bd / setwind.pas < prev    next >
Pascal/Delphi Source File  |  1989-07-27  |  1KB  |  54 lines

  1. Unit SetWind; {
  2. ------------  }
  3. {$N+,E+}
  4.  
  5. Interface {
  6. --------- }
  7. Uses CRT;
  8.  
  9. Procedure SetWindow(X1,Y1,X2,Y2 : Integer);
  10.  
  11. Implementation {
  12. -------------- }
  13.  
  14. Procedure SetWindow(X1,Y1,X2,Y2 : Integer);
  15.  
  16. { This procedure establishes a window for various menues }
  17.  
  18. Const
  19.  
  20.   UpLeftCorner         =  #201;
  21.   HorzBar              =  #205;
  22.   UpRightCorner        =  #187;
  23.   VertBar              =  #186;
  24.   LowLeftCorner        =  #200;
  25.   LowRightCorner       =  #188;
  26.  
  27. Var
  28.   I  : Integer;
  29.  
  30.  
  31. Begin
  32.   Window(X1-1,Y1-1,X2+1,Y2+1);
  33.   ClrScr;
  34.   Window(1,1,80,25);
  35.   GoToXY(X1-1,Y1-1);
  36.   Write(UpLeftCorner);
  37.  
  38.   For I := X1 to X2 Do
  39.     Write(Horzbar);
  40.   Write(UpRightCorner);
  41.   For I := Y1 to Y2 Do
  42.   Begin
  43.     GoToXY(X1-1,I);  Write(VertBar);
  44.     GoToXY(X2+1,I);  Write(VertBar)
  45.   End;
  46.   GoToXY(X1-1,Y2+1);
  47.   Write(LowLeftCorner);
  48.   For I := X1 to X2 Do
  49.     Write(HorzBar);
  50.   Write(LowRightCorner);
  51.   Window(X1,Y1,X2,Y2)
  52. End; {of Proc SetWindow }
  53.  
  54. End. {of Unit SetWind}